<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="../js/angular.min.js"></script>
	</head>
	<body>
		<div ng-app="myapp" ng-controller="myctrl">
			<div>
				<input type="text" name="nam" ng-model="name"/>
				<input type="button" value="清空" ng-click="clearVal()" />
			</div>
			<div>
				Hello,{{name}}
			</div>
		</div>
		<script type="text/javascript">
			var myapp=angular.module("myapp",[]);
			myapp.controller("myctrl",["$scope",function($scope){
				$scope.name="黑马程序员";
				$scope.clearVal=function(){
					$scope.name="";
				}
			}]);
			
		</script>
	</body>
</html>
